import os
from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    """
    为实车创建可视化
    """
    self_package_path = get_package_share_directory("april_tag_finder")
    rviz__file = os.path.join(self_package_path, "config", "tag_eva.rviz")

    rviz2_node = Node(
        package="rviz2",
        executable="rviz2",
        name="rviz2",
        output="screen",
        arguments=["-d", rviz__file],
    )

    return LaunchDescription(
        [
            rviz2_node,
        ]
    )
